package top.fzqblog.service;


import top.fzqblog.http.MusicListApi;
import top.fzqblog.http.SongApi;

/**
 * Singleton Factory with retrofit
 */
public class ApiFactory {


    static MusicListApi musicListApi = null;

    static SongApi songApi = null;

    public static MusicListApi getMusicListApiSingleton() {
        synchronized (MusicListApi.class) {
            if (musicListApi== null) {
                musicListApi = new ApiRetrofit().getMusicListService();
            }
            return musicListApi;
        }
    }

    public static SongApi getSongApiSingleton() {
        synchronized (SongApi.class) {
            if (songApi== null) {
                songApi = new ApiRetrofit().getSongApi();
            }
            return songApi;
        }
    }


}
